<template>
    <view>
        <template name="wxParse11">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse12" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse10">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse11" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse9">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse10" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse8">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse9" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse7">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse8" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse6">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse7" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse5">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse6" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse4">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse5" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse3">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse4" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse2">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse3" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse1">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse2" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse0">
            <block v-if="item.node == 'element'">
                <button size="mini" type="default" v-if="item.tag == 'button'">
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </button>
                <view :class="item.classStr + ' wxParse-li'" :style="item.styleStr" v-else-if="item.tag == 'li'">
                    <view :class="item.classStr + ' wxParse-li-inner'">
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <view :class="item.classStr + ' wxParse-li-circle'"></view>
                        </view>
                        <view :class="item.classStr + ' wxParse-li-text'">
                            <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                            <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                        </view>
                    </view>
                </view>
                <!-- <template is="wxParseVideo" :data="item:item" v-else-if="item.tag=='video'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'video'"></mp-html>
                <!-- <template is="wxParseImg" :data="item:item" v-else-if="item.tag=='img'"></template> -->
                <mp-html :content="item" v-else-if="item.tag == 'img'"></mp-html>
                <view
                    @tap="wxParseTagATap"
                    :class="'wxParse-inline ' + item.classStr + ' wxParse-' + item.tag"
                    :data-src="item.attr.href"
                    :style="item.styleStr"
                    v-else-if="item.tag == 'a'"
                >
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tag == 'table'">
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <!-- parse <template is="WxParseBr" data v-else-if="item.tag=='br'"></template> -->
                <block name="WxParseBr">
                    <text></text>
                </block>
                <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr" v-else-if="item.tagType == 'block'">
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
                <view :class="item.classStr + ' wxParse-' + item.tag + ' wxParse-' + item.tagType" :style="item.styleStr" v-else>
                    <!-- <template is="wxParse1" :data="item:item" v-for="(item,index) in (item.nodes)" :key="index"></template> -->
                    <mp-html :content="item" v-for="(item, index) in item.nodes" :key="index"></mp-html>
                </view>
            </block>
            <!-- parse <template is="WxEmojiView" :data="item:item" v-else-if="item.node=='text'"></template> -->
            <block name="WxEmojiView">
                <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                    <block v-for="(item, index) in item.textArray" :key="index">
                        <block v-if="item.node == 'text'">{{ item.text }}</block>

                        <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                    </block>
                </view>
            </block>
        </template>
        <template name="wxParse">
            <!-- <template is="wxParse0" :data="item:item" v-for="(item,index) in (wxParseData)" :key="index"></template> -->
            <mp-html :content="item" v-for="(item, index) in wxParseData" :key="index"></mp-html>
        </template>
        <block name="WxParseBr">
            <text></text>
        </block>
        <block name="WxEmojiView">
            <view class="WxEmojiView wxParse-inline" :style="item.styleStr">
                <block v-for="(item, index) in item.textArray" :key="index">
                    <block v-if="item.node == 'text'">{{ item.text }}</block>

                    <image class="wxEmoji" :src="item.baseSrc + item.text" v-else-if="item.node == 'element'"></image>
                </block>
            </view>
        </block>
        <template name="wxParseImg">
            <image
                @load="wxParseImgLoad"
                @tap="wxParseImgTap"
                :class="item.classStr + ' wxParse-' + item.tag"
                :data-from="item.from"
                :data-idx="item.imgIndex"
                :data-src="'https://tovqb.top/' + item.attr.src"
                mode="widthFix"
                :src="'https://tovqb.top/' + item.attr.src"
                style="width: 100%"
            ></image>
        </template>
        <template name="wxParseVideo">
            <view :class="item.classStr + ' wxParse-' + item.tag" :style="item.styleStr">
                <video :class="item.classStr + ' wxParse-' + item.tag + '-video'" :src="'https://tovqb.top/' + item.attr.src"></video>
            </view>
        </template>
    </view>
</template>

<script>
function e(e) {
    return e && e.__esModule
        ? e
        : {
              default: e
          };
}
function t(e, t, a) {
    if (t in e) {
        Object.defineProperty(e, t, {
            value: a,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        e[t] = a;
    }
    return e;
}
function a(e) {
    var that = this;
    var a = e.target.dataset.src;
    var i = e.target.dataset.from;
    var urls = that.data[i].imageUrls;

    // if(urls[0].indexOf("https://tovqb.top/") == -1 ){
    //     urls[0] = "https://tovqb.top/"+urls[0];
    // }
    for (var k = 0; k < urls.length; k++) {
        if (urls[k].indexOf('https://tovqb.top/') == -1) {
            urls[k] = 'https://tovqb.top/' + urls[k];
        }
    }
    if (void 0 !== i && i.length > 0) {
        uni.previewImage({
            current: a,
            urls: urls
        });
    }
}
function i(e) {
    var that = this;
    var a = e.target.dataset.from;
    var i = e.target.dataset.idx;
    if (void 0 !== a && a.length > 0) {
        r(e, i, that, a);
    }
}
function r(e, a, i, r) {
    var o;
    var d = i.data[r];
    if (d && 0 != d.images.length) {
        var s = d.images;
        var l = n(e.detail.width, e.detail.height, i, r);
        var g = s[a].index;
        var h = '' + r;
        var m = true;
        var u = false;
        var v = void 0;
        try {
            for (var f, w = g.split('.')[Symbol.iterator](); !(m = (f = w.next()).done); m = true) {
                h += '.nodes[' + f.value + ']';
            }
        } catch (e) {
            u = true;
            v = e;
        } finally {
            try {
                if (!m && w.return) {
                    w.return();
                }
            } finally {
                if (u) {
                    throw v;
                }
            }
        }
        var c = h + '.width';
        var x = h + '.height';
        i.setData({
            c: l.imageWidth,
            x: l.imageheight
        });
    }
}
function n(e, t, a, i) {
    var r = 0;
    var n = 0;
    var o = 0;
    var d = {};
    var g = a.data[i].view.imagePadding;
    return {};
}
var o = e(require('./showdown.js'));
var d = e(require('./html2json.js'));
var s = 0;
var l = 0;
uni.getSystemInfo({
    success: function (e) {
        s = e.windowWidth;
        l = e.windowHeight;
    }
});
module.exports = {
    wxParse: function () {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 'wxParseData';
        var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 'html';
        var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : '<div class="color:red;">数据不能为空</div>';
        var n = arguments[3];
        var s = arguments[4];
        var l = n;
        var g = {};
        if ('html' == t) g = d.default.html2json(r, e);
        else if ('md' == t || 'markdown' == t) {
            var h = new o.default.Converter().makeHtml(r);
            g = d.default.html2json(h, e);
        }
        g.view = {};
        g.view.imagePadding = 0;
        if (void 0 !== s) {
            g.view.imagePadding = s;
        }
        var m = {};
        m[e] = g;
        l.setData(m);
        l.wxParseImgLoad = i;
        l.wxParseImgTap = a;
    },
    wxParseTemArray: function (e, t, a, i) {
        for (var r = [], n = i.data, o = null, d = 0; d < a; d++) {
            var s = n[t + d].nodes;
            r.push(s);
        }
        e = e || 'wxParseTemArray';
        (o = JSON.parse('{"' + e + '":""}'))[e] = r;
        i.setData(o);
    },
    emojisInit: function () {
        var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : '';
        var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : '/wxParse/emojis/';
        var a = arguments[2];
        d.default.emojisInit(e, t, a);
    }
};
</script>
<style>
@import './wxParse.css';
</style>
